package com.freedom.start.sys.entity;

import com.freedom.start.common.base.BaseCrudEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author: zhenggang.liu
 * @Date: 2019/12/27 18:36
 */

@Data
@EqualsAndHashCode(callSuper=true)
public class MenuEntity extends BaseCrudEntity{

    private static final long serialVersionUID = 1L;

    @NotBlank(message = "菜单名字不能为空")
    private String name;
    private String parentId;
    private String iconClass;
    /**
     * 是否展开，0，关；1，开。
     */
    private int expandState = 0;
    /**
     * 有效性，0，删除；1，正常
     */
    private int valid =1;
    private String url;
    @NotNull(message = "代码不能为空")
    private String code;
    @Digits(integer = 9999, fraction =0,message = "排序值必须在0-9999之间")
    private int sort;

}
